﻿using DesktopToy.Core;

namespace DesktopToy.Test;

/// <summary>
/// 针对 <see cref="DeviceService"/> 的单元测试
/// </summary>
public class TestDeviceService
{
    [Test]
    public void TestGetCpuTemperature()
    {
        var service = new DeviceService();
        service.Start();
        var temperature = service.GetCpuTemperature();
        TestContext.WriteLine(temperature);
        service.Stop();
        Assert.That(temperature, Is.GreaterThan(0));
    }
    
    [Test]
    public void TestGetGpuTemperature()
    {
        var service = new DeviceService();
        service.Start();
        var temperature = service.GetGpuTemperature();
        TestContext.WriteLine(temperature);
        service.Stop();
        Assert.That(temperature, Is.GreaterThan(0));
    }
    
    [Test]
    public void TestGetStorageTemperature()
    {
        var service = new DeviceService();
        service.Start();
        var temperature = service.GetStorageTemperature();
        TestContext.WriteLine(temperature);
        service.Stop();
        Assert.That(temperature, Is.GreaterThan(0));
    }
}